package org.summer.lawyer.domain.bo.maillog;

import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.summer.common.mybatis.core.domain.BaseEntitySearch;
import org.summer.lawyer.domain.MailLog;

import java.io.Serial;
import java.util.Date;

/**
 * 邮件发送记录业务对象 mail_log
 *
 * @author summer
 * @date 2024-06-29
 */
@Schema(title ="邮件发送记录视图对象 mail_log", description = "邮件发送记录视图对象 mail_log")
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MailLog.class, reverseConvertGenerate = false)
public class MailLogBo extends BaseEntitySearch {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(title = "id", type = "Long", description = "主键ID")
    //@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 接收人
     */
    @Schema(title = "recipientEmail", type = "String", description = "接收人")
    //@NotBlank(message = "接收人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String recipientEmail;

    /**
     * 邮件主题
     */
    @Schema(title = "subject", type = "String", description = "邮件主题")
    //@NotBlank(message = "邮件主题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String subject;

    /**
     * 邮件正文内容
     */
    @Schema(title = "body", type = "String", description = "邮件正文内容")
    //@NotBlank(message = "邮件正文内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String body;

    /**
     * 状态(1成功，2失败）
     */
    @Schema(title = "status", type = "String", description = "状态(1成功，2失败）")
    //@NotBlank(message = "状态(1成功，2失败）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 发送时间
     */
    @Schema(title = "sendTime", type = "Date", description = "发送时间")
    //@NotNull(message = "发送时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date sendTime;

    /**
     * 附件地址
     */
    @Schema(title = "url", type = "String", description = "附件地址")
    //@NotBlank(message = "附件地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String url;

    /**
     * 附件ID
     */
    @Schema(title = "attachmentId", type = "String", description = "附件ID")
    //@NotBlank(message = "附件ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String attachmentId;

    /**
     * 发送失败后重新发送次数
     */
    @Schema(title = "retryCount", type = "Integer", description = "发送失败后重新发送次数")
    //@NotNull(message = "发送失败后重新发送次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer retryCount;

    /**
     * 错误消息，如果邮件发送失败，这里将存储错误信息
     */
    @Schema(title = "errorMessage", type = "String", description = "错误消息，如果邮件发送失败，这里将存储错误信息")
    //@NotBlank(message = "错误消息，如果邮件发送失败，这里将存储错误信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String errorMessage;


}
